package com.example.demo.constructor;

public class SubClass extends SuperClass {
    static {
        System.out.println("子类静态代码块");
    }

    {
        System.out.println("子类构造代码块");
    }

    public SubClass() {
        System.out.println("子类构造函数");
    }

    /**
     * 测试子父类代码块执行顺序
     * @param args
     */
    public static void main(String[] args) {
        SubClass sb = new SubClass();
        System.out.println("------------");
        SubClass sb1 = new SubClass();
    }
}
